package bean.uts.edu.au;

import java.util.ArrayList;
import java.util.HashMap;

public class CheckCardRequest {
    private String cardName;
    private int cardAmount;
    private String cardNumber;
    private String cardType;
    private String expdate;
    
    public CheckCardRequest(HashMap<String,Object> paramets){
    	if(paramets.containsKey("cardName")){
    		this.setCardName(paramets.get("cardName").toString());
    	}
    	if(paramets.containsKey("cardAmount")){
    		this.setCardAmount(Integer.parseInt(paramets.get("cardAmount").toString()));
    	}
    	if(paramets.containsKey("cardNumber")){
    		this.setCardNumber(paramets.get("cardNumber").toString());
    	}
    	if(paramets.containsKey("cardType")){
    		this.setCardType(paramets.get("cardType").toString());
    	}
    	if(paramets.containsKey("expdate")){
    		this.setExpdate(paramets.get("expdate").toString());
    	}
    	
    }
	public String getCardName() {
		return cardName;
	}
	public void setCardName(String cardName) {
		this.cardName = cardName;
	}
	public int getCardAmount() {
		return cardAmount;
	}
	public void setCardAmount(int cardAmount) {
		this.cardAmount = cardAmount;
	}
	public String getCardNumber() {
		return cardNumber;
	}
	public void setCardNumber(String cardNumber) {
		this.cardNumber = cardNumber;
	}
	public String getCardType() {
		return cardType;
	}
	public void setCardType(String cardType) {
		this.cardType = cardType;
	}
	public String getExpdate() {
		return expdate;
	}
	public void setExpdate(String expdate) {
		this.expdate = expdate;
	}
    
    
}
